<template>
    <div>
     <h2>{{$store.state.msg}}</h2>

     <div>{{msg}}</div>

<div>{{count}}</div>
<h2  v-if="homeList.info">{{homeList.info.text}}</h2>



<button @click='handlerClick'>点击</button>


<h3>{{totalCount}}</h3>
    </div>
</template>

<script>

// {mapState,mapGetters}  // 在computed 里面写
import  {mapState,mapGetters}  from 'vuex'

//  {mapActions,mapMutations}  在methods里面写
import  {mapActions,mapMutations}  from 'vuex'


export default {
    data() {
        return {

        };
    },
    created() {

    },
    mounted() {
        // this.disHome()

    },
    methods: {
        ...mapActions(['addCount','disGetData','disHome']),
        handlerClick() {
            this.disHome()

        },


    },
    computed: {
        ...mapState(['msg','homeList','count']),
        ...mapGetters(['totalCount'])


    },
};
</script>

<style scoped   lang='css'>

</style>
